import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import {resolve} from 'path'

export default defineConfig({
    plugins: [vue()],
    resolve: {
        alias: {
            '@': resolve(__dirname, 'src')
        },
        extensions: ['.js', '.scss', '.vue', '.css', '.json']
    },
    server: {
        port: 5174,
        host: true,
        proxy: {
            '/api': {
                target: 'http://10.61.5.63:8085',
                changeOrigin: true,
                rewrite: p => p.replace(/^\/api/, '')
            },
        }
    },
    css: {
        requireModuleExtension: true
    }
})
